package org.br.erp.base.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.br.erp.base.entity.Scmpartner;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.br.erp.base.vo.ScmPartnerVO;

/**
 * @Description: 往来单位
 * @Author: jeecg-boot
 * @Date:   2022-08-20
 * @Version: V1.0
 */
public interface ScmpartnerMapper extends BaseMapper<Scmpartner> {


    @Select("select s.partnercode ,s.partnerjc,s.partnername ,s.id,s2.companyaddress ,s2.taxpayerno ,s2.bank,s2.bankno ,s2.telno ,s2.faxno  from scmpartner s left join scmpartnerbase s2 on s.id=s2.parentid ${ew.customSqlSegment}")
    List<ScmPartnerVO> getScmpartnerVo(@Param("page") IPage<ScmPartnerVO> page, @Param(Constants.WRAPPER) Wrapper queryWrapper);
}
